public class Date {
    private int year;
    public int month;
    public int day;

    public Date(){
//        this 还可以调用当前类中其他的构造方法(必须在方法的第一行)：
//        this(2030,7,1);
        System.out.println("Date......");
    }

    public Date(int year,int month,int day){
        this.year = year;
        this.month = month;
        this.day = day;
        System.out.println("Date(int,int,int)");
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getMonth() {
        return month;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public void printDate(){
        System.out.println(this.year + "年"
                         + this.month + "月"
                         + this.day + "日");
    }
}
